<?php

require_once dirname(__FILE__).'/../lib/productGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/productGeneratorHelper.class.php';

/**
 * product actions.
 *
 * @package    Onnobostro
 * @subpackage product
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $
 */
class productActions extends autoProductActions {
    public function executeSubcat(dmWebRequest $request) {
          $_POST['catid'];
        $subcat = Doctrine_Query::create()
                ->from('ProductCategory sm')
                ->addWhere('sm.id = ?', $_POST['catid'])
                ->execute();

       foreach($subcat as $cat){
           echo substr($cat->name, 0,3);
           break;
       }
    }
}
